<template>
	<w-container id='about' class='plr-13 pb-20'>
		<w-navbar navType="default" id="my-nav" bgColor="#FFFF" title="关于我们"></w-navbar>
		<view class="flex flex-ai-center flex-dir-col pt-48 pb-80">
			<w-image :src="appLogo" width="72" height="72" radius="12"></w-image>
			<text class="mt-18 font-size-20 font-color-textPrimary">{{appConfig.appName}}</text>
		</view>

		<view class="ptb-13 plr-16 flex flex-ai-center flex-js-sb font-color-textPrimary" v-if="ipa" @click="toIpa">
			<text>{{handleLang('去评分')}}</text>
			<w-icon name="arrow-img" color="#FDFDFD"></w-icon>
		</view>
		<view @click="upLoad" class="ptb-13 plr-16 flex flex-ai-center flex-js-sb font-color-textPrimary mt-12">
			<text class="flex-1">{{handleLang('版本更新')}}</text>
			<text class="mr-8">{{appVersion}}</text>
			<w-icon name="arrow-img" color="#FDFDFD"></w-icon>
		</view>
		<view class="mt-24 plr-16">
			<view class="font-color-textPrimary font-w-500">
				{{handleLang('关于我们：')}}
			</view>
			<u-parse class='mt-12' v-if="aboutus" :content='handleLang(aboutus)' style="color: #999;"></u-parse>
		</view>

		<view class="flex flex-js-center font-color-textPrimary mt-80">
			<text @tap.stop="toWebview('/index/index/usageterms','用户服务协议')">{{handleLang('《用户服务协议》')}}</text>
			<text @tap.stop="toWebview('/index/index/agreement','隐私政策')">{{handleLang('《隐私政策》')}}</text>
			<!-- <text @tap.stop="toWebview('/index/index/zhihuangagreement','置换协议')">{{handleLang('《置换协议》')}}</text> -->
		</view>
	</w-container>
</template>

<script>
	import {
		mapState
	} from 'vuex'
	export default {
		data() {
			return {

			};
		},
		computed: {
			...mapState('config', {
				appLogo(state) {
					return state.info.appLogo
				},
				appVersion(state) {
					return state.info.app_version
				},
				aboutus(state) {
					return state.info.aboutus
				},
				ipa(state) {
					return state.info.ipa
				}
			}),
		},
		methods: {
			toIpa() {
				// #ifdef H5
				window.location.href = this.ipa
				// #endif
				// #ifdef APP-PLUS
				plus.runtime.openURL(this.ipa)
				// #endif
			},
			upLoad(){
				uni.showToast({
					title:'您已经是最新版本了',
					icon:'none'
				})
			}
		}
	}
</script>

<style lang="scss">
	#about {
		// background-image: url($IMG_URL + "/static/bg/page-bg.png");
		background-size: 750rpx auto;
		background-repeat: no-repeat;
		

		>#my-nav /deep/ .u-navbar__content {
			// background-image: url('@/static/bg/my-bg.png');
			// background-position: top;
			// background-size: 100% auto;
		}
	}
</style>
